package com.lc.demo.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Size;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Teacher {
    @Size(min=4,max = 4,message = "教师ID长度必须为14")
    private String teaId;
    @Size(min=1,max = 10,message = "名字长度必须在1-10之间")
    private String teaName;
    private String teaPass;
    private String teaSex;
    // 限制输入的字符串长度必须为11位，且当输入的字符串长度小于11位或大于11位时，会返回"请输入11位手机号码"这个自定义的错误信息
    @Size(min = 11,max = 11,message = "请输入11位手机号码")
    private String teaTele;

}
